<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>服务商圈</title>
	<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
    <link type="text/css" rel="stylesheet" media="screen" href="__PUBLIC__/app/css/mrs.css{$JSDEBUG}"/>
    <link type="text/css" rel="stylesheet" media="screen" href="__PUBLIC__/app/css/media.css{$JSDEBUG}"/>
    <script type="text/javascript" src="__PUBLIC__/app/js/jquery-1.9.1.min.js"></script>
    <script>
	$(function(){
		$(".mrs_servise li dd strong").each(function() {
			var ddWidth = $(".mrs_servise li dd").width();
			var strongWidth = $(this).width()+13;
			var labelWidth = ddWidth-strongWidth;
			$(this).siblings().css('width',labelWidth); 
     	});
		  
		$(".mrs_servise li h3").click(function(){
			var _this = $(this),
				liDom = $(this).parents('li'),
				id = $(this).parents('li').attr('data-id');
			$.ajax({
				url: '{:U("/Beautician/selectBeauty")}',
				data: {'beauty_id': id},
				dataType: 'json',
				success: function (result) {
					if (result.status != 1) {
						alert('选择服务美容院失败');
					} else {
						var iDom = $(liDom).find("i.unradio");
						if (iDom.hasClass('radio')) {
							iDom.removeClass('radio');
						} else {
							iDom.addClass('radio');
						}
					}
				}
			});
		});
	});
    </script>
</head>
<body style="background:#f7f7f9;">
	<include file="Public/customHeader" title="服务商圈" url="{:U('Beautician/count')}"/>
    <form action="{:U('Beautician/service')}" method="post">
	 	<section class="mrs_sec">
	       <div class="mrs_servise">
	         <h1>亲爱的美容师，您的住址位于<span>{$beautician.address}</span></h1>
	         <h2>选择可预约的服务门店</h2>
	         <ul>
	           <foreach name="beautyList" item="vo" >
		           	<li data-id="{$vo.id}">
		           	<if condition="$vo['banner']">
		           		<img src="__UPLOADS__/Beauty/Banner/{$vo.banner}">
		           	<else />
		           		<img src="__FONT__/images/btylist_01.jpg">
		           	</if>
		           	<h3>
		             	<dd><span>{$vo['name']}</span><if condition="$vo['selected']"><i class="unradio radio"></i><else /><i class="unradio "></i></if></dd>
		          		<dd><label>{$vo['address']}</label><strong class="distance">{$vo['jsonStr']}</strong></dd>	           
		             </h3>
		          	</li>
	            </foreach>
	         </ul>
	       </div>
		</section>
	</form>
</body>
</html>